package com.dcy.dao;

import com.dcy.domain.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentDao {
    public Student selectById(Integer id);
    public List<Student> selectStudents();
    //测试将许多参数封装到一个实体类中
    public int insertStudent(Student student);
    //测试多个简单变量的情况
    public List<Student>selectStudentByAgeOrEmail(@Param(value = "age")int age,@Param(value = "email")String email);
    //测试多个实体类参数变量的情况
    public List<Student>selectByMany(@Param(value = "student1")Student student1,@Param(value = "student2")Student student2);
    //按位置传递参数的情况
    public List<Student>selectStudentByLocation(int age,String email);
    //${ }占位符的使用
    List<Student> queryStudent(@Param(value = "name") String name);
    List<Student> queryStudentOrderByColume(String colume);
}
